import com.beans.ControllerDemo;
import com.beans.UserController;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author : niu niu
 * @version : 1.0.0
 * @date : 2023/4/4 18:33
 *  获取Bean对象     Bean注入
 */
public class App3 {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
        ControllerDemo bean = context.getBean(ControllerDemo.class);
        bean.sayHello();



    }
}
